using System.Runtime.InteropServices;

namespace EOSDigital.SDK
{
	public struct DeviceInfo
	{
		[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
		public string PortName;

		[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
		public string DeviceDescription;

		public DeviceSubType DeviceSubType;

		private uint Reserved;

		public static bool operator ==(DeviceInfo x, DeviceInfo y)
		{
			if (x.PortName == y.PortName && x.DeviceDescription == y.DeviceDescription)
			{
				return x.DeviceSubType == y.DeviceSubType;
			}
			return false;
		}

		public static bool operator !=(DeviceInfo x, DeviceInfo y)
		{
			return !(x == y);
		}

		public override bool Equals(object obj)
		{
			if (obj is DeviceInfo)
			{
				return this == (DeviceInfo)obj;
			}
			return false;
		}

		public override int GetHashCode()
		{
			int num = -2128831035;
			num *= (0x1000193 ^ this.PortName.GetHashCode());
			num *= (0x1000193 ^ this.DeviceDescription.GetHashCode());
			return num * (0x1000193 ^ this.DeviceSubType.GetHashCode());
		}
	}
}
